#include "arm_control.h"
#include <thread>


ArmControl ac;
void server(){
    const unsigned short SERVERPORT = 6000;
    std::cout<<"server"<<endl;
    ac.start_server(SERVERPORT);

    //ac.server_send_data();
    while(1){
        int ret=ac.server_get_data();
        if(ret<=0)break;
        ac.print_status_now();

        sleep(1);
        //ac.server_send_data();
        //sleep(1);
    }
    ac.stop_server();
}



int main(){
    thread t1(server);
    //thread t2(client);
    t1.join();
    //t2.join();



    return 0;
}

